<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f"%>
<%@ taglib uri="/mytag" prefix="yjd"%>
<div class="wrap J_check_wrap">
    <div class="h_a">搜索</div>
    <div class="search_type cc mb10">
        <form action="?" method="get" autocomplete="off">
            <label>消息类型：</label> <select name="msg_type" class="mr10">
            <option value=""  <c:if test="${paramMap.msg_type=='' }">  selected="selected" </c:if>  >全部</option>
            <c:forEach items="${typeList}" var="item">
                <option value="${item.code}"  <c:if test="${paramMap.msg_type==item.code }">  selected="selected" </c:if>>${item.desc}</option>
            </c:forEach>
        </select>
            <button type="submit" class="btn btn_submit length_1">搜索</button>
        </form>
    </div>

    <form id="J_word_form" class="J_ajaxForm"  action='<yjd:url url="/msgInfo/pending/list"/>'   method="post">
        <div class="table_list">
            <table width="100%">
                <thead>
                <tr>
                    <td>MSG_ID</td>
                    <td>消息类型</td>
                    <td>业务唯一id</td>
                    <td>消息订单id</td>
                    <td>消息来源</td>
                    <td>状态</td>
                    <td>阿里云消息id</td>
                    <td>失败次数</td>
                    <td>最大失败次数</td>
                    <td>创建时间</td>
                    <td>修改时间</td>
                    <td>内容</td>
                    <td>操作</td>
                </tr>
                </thead>
                <tbody>
                <c:forEach items="${pager.pagerModel.dataList  }" var="item">
                    <tr>
                        <td>${item.msg_id }</td>
                        <td>${item.strMap.msg_type }</td>
                        <td>${item.ref_id}</td>
                        <td>${item.msg_order_id }</td>
                        <td>${item.strMap.source }</td>
                        <td>${item.strMap.status }</td>
                        <td>${item.mns_id }</td>
                        <td>${item.fail_count }</td>
                        <td>${item.max_fail }</td>
                        <td>${item.strMap.create_time }</td>
                        <td>${item.strMap.update_time }</td>
                        <td>${item.content }</td>
                        <td>
                            <a class="btn btn_green"  href="#" onclick="showDisposDetail(${item.msg_id});">消费记录</a>
                        </td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
            <%@ include file="../public/pager/pager.pagination.jsp" %>
        </div>
    </form>
</div>
<script type="text/javascript">
    function showDisposDetail(msg_id){
        var url='<yjd:url url="/msgInfo/disposeDetail"/>'+"?msg_id="+msg_id;
        art.dialog({
            title:"消费明细",
            lock:true,
            width:'700px',
            height:'500px',
            padding:0,
            content:'<iframe frameborder="0" width="700px" height="500px" src='+url+' scrolling="no"></iframe>'
        });
    }
</script>